Method for correcting an adaptively sampled distance field

ABSTRACT

A method corrects an adaptively sampled distance field of a model. The adaptively sampled distance field includes a multiple of cells. Each cell stores distance values at vertices of the cell. The cells include interior cells, surface cells, and exterior cells, and neighboring cells have a common edge. Selected cells are marked as unprocessed cells, and the surface cells as marked as processed cells. A particular vertex of each unprocessed cell is marked as a minimum vertex if it has a minimum absolute value distance value. The unprocessed cells in an ascending order of the minimum vertices are further processed by appending, for each common edge of each unprocessed cell, distance values of neighboring processed cells to the common edge, adjusting the distance values of the vertices of the unprocessed cell according to the appended distance values of the edges and the distance values of the vertices, and marking the unprocessed cell as processed.

FIELD OF THE INVENTION

The invention relates generally to the field of computer-based methodsfor modeling the shape of an object, and in particular to correcting anadaptively sampled distance field to reflect modifications.

BACKGROUND OF THE INVENTION

Designing realistic digitized models is a major challenge for theanimation industry, particularly when the models represent characterssuch as people—real or imagined, animals, and cartoon characters.Animation artists generally employ two production methods, alone or incombination. In one method, maquettes are sculpted from a traditionalmedium like clay and then digitized. In another method, the models areconstructed using one of several commercial or custom computerizedmodeling systems, such as MAYA, SoftImage, 3DStudioMax, FormZ, andHoudini.

Clay is the medium of choice for most animation artists because it isexpressive, and working with clay is intuitive. It is difficult toimprove on clay as the ideal modeling medium. A standard approach fordesigning clay-based digital models involves sculpting a clay maquetteand digitizing or scanning the maquette to generate the digital model.There is a plethora of systems for scanning objects and generatingsurface models from the scanned data.

However, sculpting with clay and then digitizing the clay maquette hasseveral limitations for digital animation. Much detail can be lost inthe digitizing process because scanners and digitizers have inherentlimitations in resolution, are unable to digitize occluded orhard-to-reach surfaces, and are subject to noise. Thus, some of theadvantages of clay are lost in the scanning process. Furthermore,long-term storage of the clay models is difficult. It is important tonote, however, that scanned models can provide good first orderapproximations to the geometry of the clay maquettes that can then beenhanced by a computer-based modeling system. Hence, it is importantthat any modeling system does accept scanned data as input.

Most prior art computerized modeling systems typically use polygons,non-uniform rational B-splines (NURBS), or other subdivisions of planarsurfaces to represent the shape of a model. However, all threerepresentations have limitations.

Polygon models require a large number of vertices to represent detailedsurfaces, particularly when the surfaces are highly curved, textured, orinclude sharp edges. This makes model generation and editing withpolygons cumbersome and time consuming. Because NURBS are topologicallyrestricted, they must be pieced together to form complex shapes. Thispresents numerous technical and interface challenges, see DeRose et al.,“Subdivision surfaces in character animation,” Proc. SIGGRAPH '98, pp.85-94, 1998. While subdivision of planar surfaces does not suffer fromthe same topological restrictions as NURBS, controlling shape changes,and adding fine detail during editing are difficult. As another problem,all of these modeling techniques are only surface representations—themodels are nothing more than hollow shells and nothing is known aboutinterior portions.

Even worse, sculpting of surface representations can lead to models thatare not “watertight.” For example, seams where different resolutionNURBS are joined can separate to form annoying cracks and holes. Thismeans that the sculpted models have to be carefully inspected and editedbefore a watertight finished product is produced. Watertight models areimportant for several applications such as rapid prototypingtechnologies including stereo lithography.

All computerized modeling systems usually perform editing bymanipulating control vertices. This requires significant skill andpatience, as well as foresight and careful planning to ensure that themodels have enough control vertices where detail is desired. For thesereasons, computerized modeling systems do not rival the intuitive andexpressive nature of clay.

To make the manipulation more intuitive, most modeling systems allow theuser to interact with groups of control vertices using a computerimplemented (digital) sculpting tool. For example, in MAYA Artisan,NURBS models are modified via a brush tool that manipulates groups ofcontrol vertices. Operations for pushing, pulling, smoothing, anderasing the surface are well known, and the brush tool can affectcontrol vertices in a region of diminishing influence around its center,resulting in a softening of the sculpted shape. The amount of detail inthe sculpted surface depends on the number of control vertices in theregion of the sculpting tool. Finer control requires more subdivision ofthe NURBS surface, resulting in a less responsive system and a largermodel. Often, mesh subdivision is user controlled and preset. It doesnot adapt to tool selection, or the detail of the sculpted surface.Hence, achieving fine detail in desired regions without excessivesubdivision of the surface in other regions requires significantforesight and planning.

SoftImage provides a sculpting interface, called “Meta-Clay,” that issimilar to the “metaballs” technology as described by Wyvill et al. in“Animating soft objects,” the Visual Computer, 2(4):235-242, 1986.Meta-Clay is a density based representation for modeling organic,sculpted objects. This representation produces blobby shapes, and doesnot represent edges, corners, or fine detail.

Sculpting of parametric models are described by Fowler, “Geometricmanipulation of tensor product surfaces,” Proc. of the 1992 Symposium onInteractive 3D Graphics, pp. 101-108, 1992, Khodakovsky et al. “FineLevel Feature Editing for Subdivision Surfaces,” ACM Solid ModelingSymposium, 1999, and Terzopoulos et al. “Dynamic NURBS with geometricconstraints for interactive sculpting,” ACM Transactions On Graphics,13(2), pp. 103-136, 1994. However, each of these suffers from some ofthe limitations described above, and none attain sculpted results of thequality required for the animation industry.

To address the problems of polygon, NURBS, and other surface subdivisionrepresentations, volumetric data structures can be used. These datastructures can be generated parametrically or by sampling techniquesusing, for example, laser or other ranging techniques, or scanners thatpenetrate the object to be modeled. Volumetric data can represent boththe exterior and interior portions of models. The volumetric data arethen sculpted by applying digital sculpting tools. The tools modifysample values near where the sculpting tool interacts with the volume.For these reasons, sampled volumes hold more promise as a data structurefor digital clay.

FreeForm is a commercial system for sculpting volumetric models.FreeForm includes a three degree-of-freedom haptic input device whichuses force feedback to provide the user with a sense of touch whensculpting. Models are represented as regularly sampled intensity values.This greatly limits the amount of detail that can be achieved, andrequires excessive amounts of memory. For example, a minimum systemrequires 512 MB of random access memory (RAM). Intensity values can below-pass filtered to reduce aliasing artifacts in the sculpted models,resulting in smoothed edges and rounded corners typical in volumetricsculpting systems.

To take advantage of standard hardware rendering engines, volumetricmodels can be converted to polygon models using a method such asdescribed by Lorensen et al. in “Marching Cubes: A High Resolution 3DSurface Construction Algorithm,” Proc. SIGGRAPH '87, pp.163-169, 1987.However, with large volume sizes, Marching Cubes produces an excessivenumber of triangles, leading to memory overload and bottlenecks in thegraphics rendering pipeline which limit interactivity.

There are a number of publications that describe volume-based sculptingsystems including Avila et al. “A haptic interaction method for volumevisualization,” Proc. IEEE Visualization'96, pp. 197-204, 1996,Baerentzen, “Octree-based volume sculpting Proc. Late Breaking HotTopics,” IEEE Visualization'98, pp. 9-12, 1998, Galyean et al.“Sculpting: An Interactive Volumetric Modeling Technique,” Proc.SIGGRAPH '91, pp. 267-274, 1991, and Wang et al. “Volume sculpting,”1995 Symposium on Interactive 3D Graphics, ACM SIGGRAPH, pp. 151-156,1995.

However, each of these systems suffers from some of the limitationsdescribed above, such as large memory requirements, a fixed resolutiondetermined by the volume size, and soft edges. As a result, such systemsare of little use to the high-end digital animation industry.

State of the art digital studios, such as Industrial Light and Magic(ILM) and Pixar, have three fundamental requirements for a sculptingsystem that can be used to design animate digital models, such asanimated characters. Animators and artists want digital clay—a mediumwith the characteristics of real clay, (i.e., expressive in its abilityto represent both smooth surfaces and very fine detail, intuitive tosculpt, easy to manipulate, responsive to user input) and the advantagesof a digital media that include the ability to undo, script, duplicate,integrate into digital animation systems, and store permanently. Thesculpting methods should be able to execute on standard computerhardware at interactive rates, and the system must fit into existinganimation production pipelines. That is, the system must be able to readstandard 3D representations or 3D scanned data from clay maquettes, andoutput models compatible with those pipelines.

The limitations of prior art data structures and modeling systems, andthe needs of the animation industry have been partially addressed by theintroduction of adaptively sampled distance fields (ADFs), as describedby Frisken et al. in “Adaptively Sampled Distance Fields: A GeneralRepresentation of Shape for Computer Graphics,” Proc. SIGGRAPH 2000, pp.249-254, 2000.

There, ADFs are introduced, basic methods for generating, rendering, andsculpting ADFs are described, and a number of applications where ADFscan be used are listed. As an advantage, ADFs store only as much data asrequired to represent the detail in an object.

Classically, a distance field can be represented as distances, stored ina memory as scalar values. The distances specify minimum distances tosurfaces of an object. When the distances are signed, the sign can beused to distinguish between the inside and outside of the object. Zerodistance values represent the surfaces.

An adaptively sample distance field (ADF) can be generated by adaptivelysampling the object's shape, and storing the sampled distance values ina spatial hierarchy for efficient processing.

Distances at arbitrary points in the ADF can then be reconstructed fromthe sampled values, and used for computerized processing such asrendering or sculpting. The use of adaptive sampling permits highsampling rates in regions of fine detail, and low sampling rates wherethe distance field varies smoothly. Thus, ADFs enable high accuracywithout excessive memory requirements.

Frisken et al. discuss a basic sculpting procedure for ADFs and outlinemethods for generating and rendering ADFs. However, in many aspects, theprior art ADF manipulation methods are inadequate for a productionsystem such as required by the animation industry.

Specifically, a bottom-up generation method requires too much memory andtoo many distance computations, while a top-down method requires timeconsuming searches for neighbor cells in an octree, and unnecessaryrepeated recomputation of distance values. Both approaches exhibit poorspatial and temporal memory coherence for cells and distance values.These memory and processing limitations place practical restrictions onthe maximum number of ADF levels that can be generated.

To render ADFs, prior art ray casting methods are sufficiently fast forsmall local updates on a desktop Pentium class system. However, raycasting, as known, is too slow for local updates on low-end systems,such as embedded processors in hand-held devices, and woefullyinadequate for camera or view changes such as panning, rotation, andzooming. In addition, the prior art ADF manipulation methods (1) do notaddress easy-to-use user interfaces for digital sculpting (2) do notprovide efficient methods for converting ADFs to standard graphicalrepresentations, such as polygons (3) do not provide any methods forcorrecting distance values other than those at the object's surfaces (4)do not support hardware acceleration, and (5) only discrete steps aresupported during editing.

However, ADFs could still be an appropriate data structure for use witha quality sculpting system that meets the needs of digital studios ifsufficient improvements could be provided. ADFs have a number ofadvantages for the entertainment industry. For example, ADFs integratevolumes and surfaces into a single representation, thereby potentiallyreducing the number of independent representations required byproduction systems. In addition, ADFs could be combined by simpleconstructive solid geometry (CSG) operations so that individual parts ofa model can be separately modeled, and later joined together. Thisfeature could decrease production costs during model design bymaintaining libraries of model parts and features to quickly and easilydesign new models and characters.

SUMMARY OF THE INVENTION

The present invention provides an innovative volumetric sculpting systemthat uses adaptively sampled distance fields (ADFs) to enable users tohave better control while orienting and positioning sculpting toolsrelative to surfaces of digitized models. Distance values are used toconstrain the sculpting tools, and control vertices are used forregion-based conversion to triangles during editing of the model. Inaddition, the sculpted models are always without bothersome cracks andholes making them “watertight.”

The invention also provides advanced model generating and editingmethods that reduce memory requirements, provide better memorycoherency, and reduced computational costs. Also provided are methodsfor correcting the entire distance field after multiple sculptingoperations.

The invention also provides several new rendering approaches that takeadvantage of hardware acceleration in standard PCs, including fastgeneration of triangles and surface points. Methods for inputting andoutputting models from the system include an improved method forgenerating ADFs from scanned range images, and a new and very fastmethod for generating topologically consistent triangle models from ADFsat various levels of detail (LOD).

The invention, as described herein, provides animation artists with aninteractive system for sculpting. The system provides the ideal modelingmedia in the form of digital clay. The system and methods of theinvention can represent very high resolution shapes at minimal memorycosts, operate with standard computer hardware, and enable easyintegration with existing animation production pipelines.

Although the sculpting system is designed to meet the demands ofhigh-end production studios, the system also has applications in otherareas of the entertainment industry, such as character design for gamesand virtual reality environments. The system can also be used forindustrial modeling, particularly where the models cannot be generatedparametrically. The ability to output variable level-of-detail modelswith low polygon counts, as required by these applications, enables easyintegration of ADF-based models into existing polygon engines. Inaddition, the modeling methods of the invention can be used by low-endcomputing devices.

A method corrects an adaptively sampled distance field of a model. Theadaptively sampled distance field includes a multiple of cells. Eachcell stores distance values at vertices of the cell. The cells includeinterior cells, surface cells, and exterior cells, and neighboring cellshave a common edge. Selected cells are marked as unprocessed cells, andthe surface cells as marked as processed cells. A particular vertex ofeach unprocessed cell is marked as a minimum vertex if it has a minimumabsolute value distance value. The unprocessed cells in an ascendingorder of the minimum vertices are further processed by appending, foreach common edge of each unprocessed cell, distance values ofneighboring processed cells to the common edge, adjusting the distancevalues of the vertices of the unprocessed cell according to the appendeddistance values of the edges and the distance values of the vertices,and marking the unprocessed cell as processed.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow diagram of a modeling system according to theinvention;

FIG. 2 is a diagram of surface following according to the invention;

FIGS. 3 a-c are diagrams of editing strokes;

FIG. 4 is a diagram of constrained surface following;

FIG. 5 is a flow diagram of constrained surface following;

FIG. 6 is a diagram of control point editing;

FIG. 7 is a flow diagram of control point editing;

FIG. 8 is a diagram of a bounded distance tree (BDT) at various stagesduring ADF generation;

FIGS. 9-11 are flow diagrams of BDT generation;

FIGS. 12 a-b are diagrams of interior and exterior points of a model;

FIG. 13 is a flow diagram of a scan acquisition procedure;

FIG. 14 is a flow diagram of a triangulation procedure;

FIG. 15 is a diagram of cell edges used by the procedure of FIG. 14;

FIGS. 16 a-b are diagrams of cracks between edges; and

FIG. 17 is a flow diagram of an ADF correction method.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT

System Structure and Components

FIG. 1 shows a computerized modeling system 100 according to the presentinvention. The modeling system, as a basis, uses adaptively sampleddistance fields (ADFs) 10 to represent digitized models that can beanimated for use by the entertainment industry. The basic data structureof an ADF is described in U.S. patent application Ser. No. 09/370,091“Detail-Directed Distance Fields” filed by Frisken et al. on Aug. 6,1999, incorporated herein in its entirety by reference. The ADFs 10 areused to represent the digitized models. They can also be used torepresent computer implemented tools that operate on the models. Itshould be noted that the tools can add as well as remove material.

Basic components of the modeling system 100 include a user interface 101that provides input data 102 to a bounded distance tree (BDT) generator103, an editor 104, a renderer 105, a converter 106, a point generator107, and a dispatcher 108 which responds to application and userrequests 109. The system 100 also includes an idle processor 110described in greater detail below. The output data 114 of the system canbe supplied to industry standard rendering engines, such as OpenGL andRenderMan. The output data 114 can include points, triangles, andimages.

Data Structures

The input data 102 include: three-dimensional (3D) models or range data131 and generation parameters 132 for the BDT generator 103; editparameters 141 for the editor 104, a tool path 142 for the editor 104;render parameters 151 for the renderer 105; and conversion parameters161 for the converter 106. The BDT generator 103 operates on boundeddistance trees 800 stored in a cache 133. The renderer 105 also operateson an intermediate data structure representing image tiles 152 generatedby adaptive ray casting. The editor 104 and the idle processor 110operate on a script 112 representing intermediate stages of the toolpath 142. The renderer 105, converter 106, and point generator 107operate on images, points and triangles 114 to be processed by therendering engine 111, and the converter 106 generates triangles 115 fromthe ADFs 10.

System Component and Data Interactions

The input data 102 is specified by a user with the user interface 101.The user sets the parameters 132 for the BDT generator 103, theparameters 141 for the editor 104, the parameters 151 for the renderer104, and the parameters 161 for the converter 106. The user also selectsthe 3D model or range data to be processed by the system 100, the editsto the ADFs 10, and how and when the ADFs are to be converted to thetriangles 115.

The BDT generator 103 and the editor 104 interact by exchanging localregeneration data 135 that include the tool path and model geometry. Theidle processor interacts with the editor to refine edits 136, and withthe renderer to refine the rendered image 137. The renderer interactswith the converter to convert the ADFs 10 to triangles 114.

System Operation

During operation of the system 100, the user can start by generating aninitial model using CSG operations on standard object shapes such asspheres and boxes, or start by converting a standard 3D model or rangedata to an ADF. The user then proceeds by sculpting the model using theeditor and selectable sculpting tools.

As stated above, the sculpting tools can also be represented by ADFs, ora simple distance function defining the shape of the tool if the shapeis simple, for example, spherical. During sculpting, the rendererupdates the image tiles 152 while automatically switching betweenseveral rendering methods depending on user actions and systemcapabilities.

During idle-time, the idle processor 110 performs a number of operationsincluding increasing the rendering resolution of the image tiles for theadaptive ray casting, increasing the resolution and extent of edits fromthe scripted tool paths 112, and correcting distance values for pointsin the ADFs that are not on the surface being sculpted.

Interactive Sculpting

The system 100 includes interactive software for file manipulation,operation undos, selection, shape smoothing, navigation, and lightingcontrol that are well known to those of ordinary skill in the art. Thedescription herein focuses on the unique methods of the present systemfor interacting with volumetric data that exploit the properties of theADFs 10.

Surface Following

As shown in FIG. 2, the system 100 can determine a distance value and adirection 201 from any point 202 in the adaptively sample distance field10 to a nearest point 203 on the surface 204 of the model 200. Thesystem 100 uses this information to guide the path 205 and orientationof a sculpting tool 210, perhaps manipulated by an input means, e.g., amouse or a distance function. The system forces the tool to follow thesurface of the object. It can also, optionally, orient a principal axis211 of the tool 210 to be perpendicular to the model's surface 204.Because the object is represented by an ADF and the tool is representedby an ADF or a distance function, it is possible to determine thedistance between the surface and the tool, the orientation of thesurface, i.e., the direction of the gradient of the object's distancefield, and the principal axis of the tool.

Surface following is accomplished by iteratively moving the tool in thedirection of the gradient of the distance field of the object. Thedistance moved is an amount proportional to the distance between thetool and the surface, or from some “offset” surface 220 for constrainedsculpting as described below. The offset surface can be external orinternal to the surface of the object. At the same time, the principalaxis 211 of the tool can be aligned with the surface normal of thenearest point on the surface. Surface following is particularly usefulwhen editing a 3D shape with a 2D input device such as a mouse. It canbe difficult to locate the tool accurately on the surface. Surfacefollowing enables more intuitive control when sculpting surfaces thatare oblique to a viewing direction.

Bezier Tool Paths

Sculpting can be accomplished by a set of discrete edits along thetool's path. However, as illustrated in FIGS. 3 a-c, this approach canbe inefficient and erroneous resulting in redundant overlapping editsfor slow tool movement (FIG. 3 a), and broken edits for fast toolmovement (FIG. 3 b). If the shape of the tool is axially asymmetric,then the edits can be broken and misaligned when the tool is oblique tothe tool's path (FIG. 3 c).

To address these problems, the system edits the ADFs 10 directly with aswept volume corresponding to the geometry of the tool as the tool movesalong a 3D Bezier curve. The system uses a Bezier clipping process tocompute distances from the curve, and then uses the tool's geometry togenerate the swept volume, see Nishita et al. in “Ray tracing trimmedrational surface patches,” Proc. SIGGRAPH '90, pp. 337-345, 1990.

For a spherical tool, distances in the swept volume are computed byoffsetting the distances to the centerline of the tool path. For toolswith rectangular or other shapes, the distance computation is moreinvolved but can still be more efficient than a point-based evaluation.This approach allows two levels of control. First, the Bezier paths canbe automatically derived from the user's input strokes and then carved.Second, the Bezier curve can be explicitly drawn onto the surface of themodel, and edited using control points before the curve is carved ontothe surface.

Scripting of the Tool Path

As an advantage, the system 100 records edit paths in the script 112during editing for later processing. The scripted paths provide threeimportant features. First, the editing resolution and the extent of thetool influence on the ADF can be limited in order to achieve interactivespeeds. When this occurs, the scripted edit paths are used for lazyevaluation of the edits at higher resolutions, and for increasing theextent of the tool influence further into the ADF during idle-timeprocessing. Second, scripted paths provide a history of the editingsession, allowing the model to be regenerated on systems with differentmemory and processing power. Third, the scripted paths, combined withstored intermediate versions of the ADF, enable the system to processmultiple undos without excessive storage. In the preferred embodiment,the script is in the form of a character string or binary data definingthe parameters of the tool's path.

Dynamic Tools

The system 100 permits the shape of the tool and its function(add-remove) to vary with time/distance traveled, or according to itslocation on the surface, or according to a description in the tool path.The description can be a procedure which modifies both shape andfunction based on numerous parameters such as time, distance, gradient,surface complexity, and cell geometry.

Distance-Based Constraints

As shown in FIG. 4, the system 100 can provide an enhanced modelinginterface because the ADFs 10 represent the distance from the models'surface to any point in space. The tool can be constrained to move alongthe offset surface 220. Thus, the system can force the tool to remove oradd material at a specified depth (internal offset surface), or height(external offset surface) from the original surface. The computation tokeep the tool on the offset surface is as simple as it is to keep thetool on the true surface as described above.

In addition, the system can use a digital “mask,” 420, also in ADF formor as a traditional distance field. The mask can be used in two ways.First, the mask can be used to prevent the tool from modifying specified2D or 3D regions of the model. Second, the tool can be used to“cut-away” portions of the mask, and then only the exposed portions ofthe model are further processed by either adding or removing material.

The mask can be in the form of a “force field” 430, which can also berepresented as an ADF. The force field's reconstructed distance fieldand gradient can provide physical and visual cues, e.g., force feedbackfor haptics, that indicate tool depths or proximity to the model'ssurface. Alternatively, the force field can just constrain the editingwhile the tool is within the “influence” 431 of the force field, thatis, the tool is near the mask edges. In addition, multiple masks andforce fields can be combined to provide more complex editingconstraints. Note, if the mask constrains the tool to move inside themask region then the force field extends inwards, otherwise the forcefield extends outwards from the mask.

Applications for Distance-Based Constraints

Distance-based constraints are useful in many applications. As definedby Leler in “Constraint programming languages, their specification andgeneration,” Addison-Wesley Publishing Company, 1988, a constraint is adesired relationship among two or more objects. Industrial designs areoften considered to be constraint oriented. The constraints of thedesign usually indicate limitations in the range of possible solutions.

When considering tolerance constraints, which are usually related to asingle model or surface, the above definition of constraint must beenhanced. Therefore, in the preferred embodiment of the system 100, aconstraint is either imposed on a single model, or represents a desiredrelationship among two or more models.

An ADP constraint includes at least one ADF, e.g., 420, and a constraintprocedure 440 for instantiating that constraint in the system 100. Forexample, the constraint procedure 440 might absolutely limit the toolfrom entering the ADF, as for the mask 420, or limit the tool's movementwhen the tool is within a very small specified distance from thesurface, or limit the tool from entering a region defined by the fieldof the ADF, combined with an explicit function that distorts that field.In addition, constraints can be combined to form a complex constraintsystem.

One of the novelties in this approach is that constraints can beexpressed as 2D or 3D models which are either converted into ADFs ordrawn directly as ADFs. This representation of constraints as adaptivelysampled distance fields enables constraints to be applied throughoutspace. Associating a procedure with the ADF permits unlimitedflexibility that has particular applications to industrial design. Forexample, if the system is used to design integrated circuits, thensub-micron precision can be obtained easily by specifying constraintswhich guide a tool to the desired accuracy.

Surface Following Procedure for Distance-Based Constraints

FIG. 5 shows a procedure 500 that implements distance-based constraintsof the system 100. Input data to the procedure 500 include ADFs 10 forthe model, a tool, masks and/or force fields, constraints 501, e.g.,desired distance from the surface, and tool orientation and positionparameters 502, e.g., principal axis of tool, and desired angle withsurface. The model, tool, and constraints are manipulated on a displaydevice with an input device 503, e.g., a mouse.

The mouse specifies some current input position (p) 504. The inputposition is transformed 510 to p′ 505 in the coordinate system of theADF. The distance and the gradient 506 at p′ are reconstructed 520. Thetool is positioned and oriented 530 to determine a new orientation andposition 507, and the tool is displayed 540 to the user.

Control Point Editing

While digital sculpting provides a powerful and flexible means fordigital model design, there are times when control vertex manipulationhas its advantages. For example, to puff or pucker a character's cheek,it can be easier to edit a set of control vertices than to alter theshape of the cheek by adding or removing material with sculpting tools.

Thus, as shown in FIGS. 6 and 7, the system 100 provides means 700 forselecting a portion 610 of the ADF model 10, and converting the selectedportion to a polygon (triangular) model 620 with control vertices at auser controlled level-of-detail, as described below. The controlvertices can then be manipulated, and the edited portion 620 of the ADFcan be regenerated from the triangle model.

In the control point editing procedure 700, the input parameters are theADF 10, and triangulation parameters 701. Step 710 selects ADF cells 711to triangulate, e.g., the user points at the model's surface andidentifies the desired portion. The marked cells are triangulated 720 asdescribed in further detail below. The triangle mesh 721, at a specifiedLOD has an edge on the boundary of the selected portion. The trianglemesh is then edited 730, using any known editing procedure. The editedtriangles 731 are locally regenerated 740 to produce the edited ADF 630.During the editing and regeneration, the edge of the selected portioncan remain in place to retain a sharp edge, or the edge can be relaxedso that the transition from the selected portion to the rest(unselected) of the surface is smooth.

Bounded Distance Tree Generation and Editing

Frisken et al. outline two methods for generating ADFs. A bottom-upmethod generates a fully populated octree and coalesces cells upwardswhen the distance field represented by a cell's eight children is wellapproximated by the sampled distance values of the cell. A top-downmethod recursively subdivides cells which do not pass a predicate testcomparing distances computed from the model's distance function withdistances reconstructed from the cell's sampled distance values atmultiple test points.

In practical applications, both of these methods have seriouslimitations. The bottom-up approach requires excessive amounts of memoryand too many distance computations to generate high resolution ADFs,while the recursive top-down approach moves up and down through theoctree levels and requires many redundant distance computations andreconstructions. Both approaches exhibit poor memory coherenceminimizing any beneficial effects that could otherwise be obtained fromcaching. Times for generating an ADF with a maximum octree level ofeight (level-8 ADF) is on the order of 20 seconds, and 40 seconds for alevel-9 ADF. This is for a relatively simple CSG model using thetop-down generation method executing on a desk-top Pentium III system.For both methods, generation of ADFs higher than level-9 is impracticaldue to excessive generation time and memory requirements.

In the present system, the BDT generator 103 balances memoryrequirements, memory coherence, and computation while constructing theADFs. Generation times for similar CSG models are reduced significantlyto less than one second for a level-8 ADF and about two seconds for alevel9 ADF. This is a 20 times increase in speed over the prior artmethods. Better memory utilization and the faster generator enable thesystem to generate a level-12 ADF in about 8 seconds.

It should be noted that a level-12 ADF represents a resolution range of1:2⁻¹², i.e., 1:0.00024. Representing this dynamic range in a regularlysampled prior art volume would require about 70 billion sample values,clearly beyond the capabilities of most general purpose computers, andcertainly impossible for embedded processors. In sharp contrast, atypical level-12 ADF requires on the order of 2 to 3 million distancevalues, a considerable improvement, and well within the capabilities ofeven small portable devices, such as laptops, personal digitalassistants, and wireless communication devices.

As shown in FIG. 8, the BDT generator 103 proceeds in a top-down mannerto generate an ADF 10 from a root cell (C₁) 801 in layers, applyingrecursive subdivision and using bounded distance trees (BDT) 800. FIG. 8shows the octree for a level-12 ADF with layers at level-3 803, level-6806, level-9 809, and level-12 812. The notation C_(n) indicatescandidate cells for further subdivision. A layer's depth determines theincrease in octree depth when the layer is processed. For example, alevel9 octree that is generated with a layer depth of three is generatedfirst to level three, then to level six, and finally to level nine.

Within each layer, the ADF octree is processed one BDT 800 at a time.The BDT can have two, three, or more dimensions. In 2D, the BDT can beconsidered a “tile,” and in 3D a “cube.” A BDT is a data structure usedto store computed and reconstructed distances, thereby avoidingredundant distance computations for neighboring cells. In the preferredembodiment, the BDT is represented as an array in a cache. As acharacteristic, and as shown in FIG. 8, a BDT has a limited depth, andis stored temporarily in the cache while distance values are computed.Each distance value in the BDT has an associated “validity” bitindicating whether or not the distance value is valid. As anothercharacteristic, during normal operation, e.g., editing and sculpting,only “surface” BDTs containing surface cells are processed. BDTs thatare entirely composed of interior and exterior cells are not dealt withuntil the “remote” portions of the distance field are corrected, seeFIG. 17 below.

The layer depth sets the size of the BDTs. For example, a layer depth ofthree, for a 3D model, indicates cubic BDTs of size 2³×2³×2³. Whengenerating a level-9 ADF with a layer depth of three, up to 8³ leafcells are generated in the first layer. When the second layer isprocessed, each leaf cell at level three, as produced from the firstlayer, becomes a candidate for further subdivision and acts as a parentcell of a new BDT. When processing the third layer, each leaf cell atlevel six, produced from the second layer, becomes a candidate forfurther subdivision and so on until a maximum specified level of the ADFis reached or no more candidates remain.

As an advantage of the invention, computed and reconstructed distancesfor each BDT are produced only as needed during recursive subdivision.In addition, the BDT data structure does not use pointers, as in theADFs 10, thereby greatly reducing the storage required, and enabling theBDTs to be cached to reduce processing time. Furthermore, when thedistance values of the BDT are represented as array elements, ratherthan a pointer-based tree, access to a distance value requires a single,constant-time operation.

A corresponding bit map 1009 associated with each bounded distance tree800, see FIG. 10, keeps track of valid distance values in the BDT 800.The bit map ensures that distance values within the BDT are computed andstored only once. There is one validity bit for each distance value inthe BDT, i.e., each array element.

After a BDT has been fully processed, valid distances in the BDT areappended to the ADF, and cell pointers to the valid distances areupdated in the ADF. Special care is taken at BDT boundaries byinitializing the BDT 800 and corresponding bit map 1009 from neighboringcells that have already been processed to ensure that distances are alsoshared across neighboring cells of different BDTs, again improvingperformance.

The size of the BDTs can be adjusted to match the size of the cache 133,see FIG. 1. In Pentium class systems, for example, the BDT storing up to8³ distance values works effectively, especially when each distancevalue only requires two bytes. The use of the bit map 1009 furtherenhances CPU and cache performance. For example, because the bit map1009 stores 32 validity bits in a single memory word on a 32-bitcomputer, the BDT generator can invalidate 32 distance values in a BDTin a single operation. As an advantage, the bounded distance tree datastructure is substantially smaller than the data structure for the ADF.

The final cells and distances of the ADFs 10 are stored in contiguousarrays of the main memory to further enhance spatial coherency andperformance when processing the ADFs 10 during other system operationssuch as rendering. These arrays are allocated in blocks as needed duringBDT generation. The arrays are truncated to a maximum required size whenBDT generation completes. Because the array blocks are contiguous,updating cell and distance value pointers, when an ADF is moved orcopied in memory, is both fast and easy.

FIGS. 9, 10, and 11 show steps of a software procedure 900 thatimplements the BDT generator 103. Step 901 allocates blocks of memoryfor cells, distance values (DistVals), the BDT bit map 1009, and the BDT800. Step 1000, see FIG. 10, initializes the fields of a cell andcomputes the cell's error; other processing steps performed with step1000 include initializing a maximum depth level (MaxLevel), invalidatingthe bits in the BDT bit map 1009, and setting a candidate cell(beginning with the root cell 801). A candidate cell is a cell which mayrequire further subdivision. Until there are no more candidate cells902, candidate cells are recursively subdivided 1100, see FIG. 11, toMaxLevel. Valid distance values are copied in step 903, and step 904gets a next candidate cell. At completion, final cells and distancevalues are truncated 905 to a predetermined maximum required size.

As shown in FIG. 10, the initializing step 1000 includes a step 1001 toinitialize the fields of the cell, a step 1002 that computes the cell'serror measure, and a step 1003 which sets the cell's error measure. Notethe use of the BDT 800 and its associated bit map 1009 to avoidcomputing distances already computed.

The recursive subdivision step 1100 includes the following sub-steps. Astep 1101 excludes interior and exterior cells, i.e., all cells butsurface cells, from further subdivision using the distance values storedfor the corners of the cells, and the diagonal lengths of the cells.Step 1102 stops subdividing when the error criterion is met. Step 1103stops subdividing when the MaxLevel is reached. Step 1104 actuallyperforms the subdivision of the cell, and steps 1105 and 1107 set thecell type (interior, exterior, and surface) based on the cell's distancevalues. Step 1106 coalesces interior and exterior cells into largercells whenever possible.

Bounded-Surface Generation

The BDT generation method shown in the FIGS. 8-11 normally onlysubdivides surface cells. This surface-limited generation reduces memoryrequirements while assuring accurate representation of the distancefield in surface cells. This is sufficient for processing regionsimmediately adjacent to the surface.

However, for some of the editing methods described above, such assurface following, the use of distance-based constraints, and forcefeedback, the distance field is required to be accurate for somedistance from the surface. Under these circumstances, the BDT generationmethod 900 is modified so that exterior and interior cells are notcoalesced unless the cells satisfy a maximum error constraint wheneverthe cells are within a bounded region defined by a specified minimumdistance from the surface. This bounded-surface generation method isunlike the prior art ADF generation techniques.

Editing

In the present system, sculpting is performed on the ADFs 10 using alocal editing process. Compared with prior art ADF processingtechniques, as described by Frisken et al., the use of BDTs according tothe invention decreases edit times by a factor of 20 and reduces memoryrequirements for cells and distance values by a factor of two. Theseadvances make it possible to perform highly detailed sculpting indesktop and portable computer systems.

To accommodate fewer resources on smaller computer systems, the system100 can limit both the sculpted resolution and the volumetric extent ofthe tool influence to ensure interactivity. As described above, thesystem 100 maintains a script 112 of sculpting operations andintermediate versions of the ADF. The script 112 can be used duringidle-time processing to increase the sculpting resolution and extend thetool influence into the ADFs 10.

Correcting Remote Distance Values

As described above, the ADFs 10 are sculpted by applying CSG operationsto the model and tool distance fields. For example, following thepositive-inside and negative-outside signed distance value convention ofFrisken et al., the sculpted distance at a point, p, for a differencingsculpting tool can be expressed as dist(p)=min(dist_(mode)(p),-dist_(tool)(p)), and the sculpted distance at p for an additive tool isdist(p)=max(dist_(model)(p), dist_(tool)(p)). The use of min/maxoperators can result in inaccurate distance values in the ADFs 10 atpoints in the ADF remote from the sculpted surface, as shown in FIGS. 12a and 12 b.

For example, as shown in FIGS. 12 a and 12 b, a point P1 1201, whenusing a differencing tool, and the point P2 1202, when using an additivetool, both would be assigned distances to surfaces that do not exist inthe sculpted object, resulting in an inaccurate field at these points.When processing requires only a correct representation of the distancefield at the surface, e.g., during rendering, these inaccurate valueshave no effect.

However, some of the editing techniques and applications require anaccurate representation of the distance field remote from the surface.For example, when the system is used for industrial design, sub-microndistance accuracies may be required throughout the volume to properlyguide a tool along a specified path. Hence, the idle processor 110corrects the remote distance field during system idle-time. The idleprocessor 110 can also correct the distance field on-demand in aregion-of-focus, for example, near the working surface of the sculptingtool, to reflect the fact that material is being removed or added.

There are a number of approaches available for correcting the remotedistance field given accurate distances near the model's surface. A fastmarching method, derived from level set techniques, can be used topropagate distances outward from a narrow band of correct values nearthe surface. Another approach holds distance values at the zero-valuediso-surface and the distance field boundaries constant, and usessimulated annealing to smooth out the field in between. Neither of thesemethods are designed for adaptive distance fields, and both methods aretoo slow for interactive editing.

FIG. 17 shows a method 1700 for correcting remote distance valuesaccording to the invention, for example, during idle processing 110.Step 1701 marks, for each interior/exterior (non-surface) cell, the cellcorner having the minimum, absolute value, distance value. Eachnon-surface cell is also marked as unprocessed. Note, it assumed thatthe distance values of the surface cells are always correct for aparticular error measure, and normally do not need to be corrected.However, it may be desired to change the error measure, for example, forlarge cells through which the surface passes. In this case, these largesurface cells can be selected for “correction.”

Step 1702 then sorts the interior/exterior cells into ascending orderusing the marked minimum, absolute value, distance values as the sortkey. Step 1703 processes the interior/exterior cells in that sortedorder.

Step 1704 examines each edge of each interior/exterior cell 1711 anddetermines the neighbor cells 1705 that share the edge and that areeither a surface cell or a processed cell, and then step 1707 appendsany missing distance values on the neighboring cell's edge to the sharededge of the interior/exterior cell 1711. Note, distance values canappear anywhere on the shared edge because cells are of varying sizes.

Then, step 1708 sets the corner values of the interior/exterior cell1711, using the newly appended distance values, according to one of thecorrection methods 1710 described below. Finally, step 1708 marks thecell 1711 as processed, and continues with the next sortedinterior/exterior cell until all interior/exterior cells have beenprocessed.

Correction Method 1

Mark each cell corner vertex as “free” or “fixed.” In one embodiment ofthe invention, a corner is fixed only if it is a corner shared with aneighboring surface cell, otherwise it is free. In another embodiment ofthe invention, a corner is fixed if it is a corner shared with aneighboring surface cell, or processed cell, otherwise it is free. Then,determine the number of appended distance values associated with eachcorner. An appended distance value is associated with a corner when itis located on an edge connected to that corner, and lies anywherebetween the corner and the edge's midpoint. Next, determine the corner Cwith the largest number of associated distances. Then, divide the cellinto a uniformly sampled grid at a specified resolution. In a preferredembodiment, the memory required to represent the grid fits into theCPU's cache, thereby maximizing performance. Last, perform a Euclideandistance transform on the regular grid propagated from the corner C andcorrecting only the free corners of the cell, see Cuisenaire, “DistanceTransformations: Fast Algorithms and Applications to Medical ImageProcessing,” Ph.D. thesis, Universite Catholique de Louvain, 1999.

Correction Method 2

Determine the nearest newly appended distance D for each free corner.Then, for each free corner C, determine the Euclidean distance N to itsnearest newly appended distance D. If the distance at C is outside therange defined by the distance D and the distance N, then set thedistance at C to this range.

Correction Method 3

Same as Method 2, but instead of using the nearest newly appendeddistance for each free corner, use all of the newly appended distancesto correct each free corner.

Correction Method 4

Use the newly appended distances to derive a corrected distance at everyfree corner using extrapolation of distances along an edge orextrapolation of distances throughout the distance field.

Selecting Interior/Exterior Cells for Correction

In one embodiment of the invention, step 1701 selects allinterior/exterior cells. In another embodiment of the invention, step1701 selects only those interior/exterior cells within a specifieddistance from the surface. In yet another embodiment of the invention,step 1701 selects only those interior/exterior cells which are immediateneighbors to surface cells. In yet another embodiment of the invention,step 1701 selects only those interior/exterior cells which are within aspecified region, where the region is determined by input from a user,e.g., the location indicated by a mouse event. For some applications,only interior OR exterior cells require correction. In those cases, theinvention limits step 1701 to select only the specified cell type, i.e.,interior OR exterior.

Selecting Interior/Exterior Cells To Process During BDT Generation

Similar criteria listed above for selecting interior/exterior cells forcorrection, can be applied to selecting which interior/exterior cellsare forced to pass the predicate test during BDF generation. Thepredicate test determines if a cell's reconstruction method accuratelyrepresents the distance field, see Frisken et al. In one embodiment ofthe invention, the BDT generator does not require the interior/exteriorcells to pass the predicate test (surface-limited generation). Inanother embodiment of the invention, the BDT generator forcesinterior/exterior cells within a specified distance from the surface topass the predicate test (bounded-surface generation). In yet anotherembodiment of the invention, the BDT generator forces interior/exteriorcells which are within a specified region to pass the predicate test,where the region is determined by input from a user (e.g., the locationof mouse events).

Fast Rendering

Fast Global Rendering

The system 100 according to the invention also includes methods forconverting the ADFs 10 to triangle and point models so that the systemcan be integrated with standard hardware and software implementedrendering engines. Given current standard hardware, such as the NVIDIAGeForce2, these conversion methods provide truly interactivemanipulation of ADFs. For triangles, the ADF is converted to a trianglemodel that can be rendered using the OpenGL rendering engine 111, takingadvantage of hardware triangle rasterization available on many computersystems. The method for converting the ADF to triangles is describedbelow.

Conversion times are quite fast: the system 100 can generate a trianglemodel with 200,000 triangles from a level-9 ADF in 0.39s on a Pentium IVclass processor. Models with lower LODs can be generated even faster,e.g., in less than 10 ms for a 2000-triangle model. Thus, trianglemodels can be generated on-the-fly with imperceptible delays whennavigation tools are selected, permitting fast global rendering whilepanning, zooming, or rotating the camera.

Alternatively, the system can use point-based rendering for global viewchanges, taking advantage of the current trend in computer graphicstowards hardware-assisted point rendering as described by Rusinkiewiczet al. in “Qsplat: A Multiresolution Point Rendering System for LargeMeshes,” Proc. SIGGRAPH'00, pp. 343-352, 2000.

In the preferred embodiment, the system 100 renders points using theOpenGL rendering engine 111. The point generator 107 can produce 800,000Phong-shaded points in 0.2 seconds, and less than 0.12 seconds forunshaded points when shading is performed by the rendering engine 111.The points can be rendered interactively on desktop systems and, liketriangle models, the points can also be generated on demand whennavigation tools are selected.

The availability of the distance field and the octree data structuregive ADFs unique advantages for generating points. For example, a pointrandomly generated within a cell can be trivially projected onto thesurface in one step using the distance value and gradient at that point.Furthermore, the cell size can be used to determine both the number andsize of points to be generated in that cell, thereby enablingmulti-resolution rendering methods.

Because point generation is very fast, the system can also useview-dependent point generation that culls back-facing cells andback-facing points, and that uses the gradient in the cell to generatemore points on silhouette edges.

Fast Local Rendering

The present system uses two methods to locally update the image in thesculpted region depending on system resources: local triangle generationwith hardware rendering, and adaptive ray casting for software-basedrendering. While point generation is fast enough for local editing,point models do not represent fine sculpted detail in the image as wellas triangles or ray casting. Therefore, point models are not utilizedfor fast local rendering.

Local Triangles

When the ADFs 10 are converted to triangle models for hardware renderingand there is sufficient memory to maintain both the ADF and a trianglemodel, the system can locally update these models during sculpting. Toenable local updating, triangles are indexed according to the cells fromwhich they are generated. When a cell is affected by sculpting, itsassociated triangles are deleted and new triangles are generated,on-the-fly, during the sculpting process. This method is very fast butrequires additional memory per cell for triangle indexing as well asmemory for maintaining the dynamic triangle model.

Adaptive Ray Casting

The system 100 provides ray casting for high quality rendering of thesculpted surface. When this method is used during sculpting, the imageis updated locally within the region affected by the tool.

For applications that cannot perform software-based ray casting fastenough for interactive updating, the system 100 uses an adaptive raycasting approach 152 to produce an image representation of the model ata particular viewpoint. The ray casting approach is an extension ofdirectional coherence maps (DCM) described by Guo in “ProgressiveRadiance Evaluation Using Directional Coherence Maps,” Proc. SIGGRAPH'98, pp. 255-266, 1998.

The image region to be updated is divided into a hierarchy of imagetiles, and subdivision of the image tiles is guided by a perceptuallybased predicate. Pixels within image tiles that have not been fullysubdivided are bi-linearly interpolated to produce the image.

For each image tile, rays are cast into the ADF 10 at tile corners andintersected with the surface using a linear intersection method. Thepredicate used to test for further subdivision is based on a methoddescribed by Mitchell in “Generating antialiased images at low samplingdensities,” Proc. SIGGRAPH '87, pp. 65-72, 1987.

Mitchell individually weights the contrast in red, green, and bluechannels, and the variance in depth-from-camera across the image tile.The adaptive ray casting approach 152 according to the inventiontypically achieves a 6:1 reduction in rendering times over casting oneray per pixel, and more than a 10:1 reduction when the image issuper-sampled for anti-aliasing.

Adapting the Sculpting System to a Character Animation Pipeline

Any sculpting system that uses a novel data representation for digitalmodel design is useless to a production system unless the sculptingsystem can be integrated with existing rendering pipelines. Thesepipelines can be extensive, particularly in an animation studio. Hence,the system 100 inputs models from several standard types ofrepresentations including triangle models, implicit functions, CSGmodels, Bezier patches and scanned data, and outputs triangle models.Converting most of the above representations to ADFs is described byFrisken et al.

This description focuses on two important new developments: a method forgenerating ADFs from scanned range data which advances the state of theart, and a method for triangulating ADFs that generates topologicallyconsistent LOD triangle models in a fraction of a second.

Input from Range Data

There are several commercial systems available for converting scanneddata to triangle models. One approach for importing ADFs into the systemwould be to convert the scanned data to triangle models and then convertthe triangle models to the ADFs 10. However, experience indicates thatthe triangle models produced by the conversion from scanned data areoften problematic, containing holes, flipped triangles, and overlappingsurfaces. Instead, the present system generates the ADF 10 directly fromthe scanned data.

Several recent research papers have presented methods for convertingscanned data to triangle models that make use of signed distance fieldsfor more robust, watertight surface reconstructions. For example, themethod as described by Curless et al. in “A Volumetric Method forBuilding Complex Models from Range Images,” Proc. SIGGRAPH '96, pp.303-312, 1996, is the basis for the data conversion method used by theCyberware scanning system. Wheeler, in “Automatic Modeling andLocalization for Object Recognition,” Ph.D. thesis, Carnegie MellonUniversity, 1996, describes a method that uses a true Euclidean distancefunction, and a more volume-centric approach.

There, the scanned data consist of a set of overlapping 2D scanned rangeimages taken from different viewpoints. Each range image is converted toa range surface triangle mesh, and all of the triangle meshes areimported into the same coordinate system. Wheeler then generates a3-color octree of the distance field in a top-down manner by computingthe signed distance from volume elements to each range surface, andcombines the distances using a probability-weighted function.

The probability function depends on the angle of each contributingtriangle with the original scan direction, the location of the trianglerelative to the edge of its scanned image, the degree of agreementbetween distances computed for overlapping range surfaces, and possiblyother factors. As a last step, the Marching Cubes method of Lorensen etal. is applied to all the boundary leaf cells to generate a closed,assuming it makes use of volume boundaries, watertight triangle surfacefrom the signed distance volume. The problem with Wheeler's approach isthat all cells containing the model's surface are subdivided to the sameoctree level, thereby increasing memory requirements and processingtime, and also significantly increasing the number of trianglesgenerated using Marching Cubes.

The system 100 adapts and enhances Wheeler's method for the ADFs 10. Histop-down generation of a three-color octree is replaced by the BDTgeneration as described above. In the ADFs 10, boundary cells arerepresented as a tri-linear field and consequently do not requiresubdivision in flat or near-flat regions of the surface, resulting in asignificant savings over the three-color octree in both memoryrequirements and the number of distance computations.

After the scanned data are imported into the system, the sculptingsystem can be used to correct problems in the model. The problems can bedue to occluded regions, detail lost because of resolution limits orscanner noise, and rough or broken surfaces at seams between rangeimages. Finally, when desired, the ADF 10 can be converted into atriangle model using the approach described below.

As another advantage of the invention, the system 100 generatessignificantly fewer triangles than the prior art methods because thereare significantly fewer cells in the ADFs 10 than in the prior artthree-color octrees. Furthermore, since the ADFs 10 are a hierarchicaldata structure which support the generation of triangles at a specifiedlevel-of-detail, see below, the system 100 can produce a triangle modelwhose size is tuned specifically for an application.

FIG. 13 shows a method 1300 for inputting scanned data from a scanner orrange finder 1301. The scanner produces range images (R₁, . . . , R_(N))1302. The range images are converted 1303 to range meshes 1304 in asingle coordinate system. Using a probability function 1305, the rangemeshes are converted to the ADF 1306 using the BDT generator 103. Theprobability function determines the contribution (weight) of each vertexin each mesh to the corresponding cell in the ADF. The editor 104 canthen be applied to correct problems with occlusions, noise, lost detail,etc., to produce the ADF 10.

Conversion to Triangles

The present system 100 also provides a new method for triangulating theADFs 10 for rendering, control point-based editing, and conversion tooutput models that can be integrated into an existing animationpipeline. The triangulation method produces topologically consistenttriangle models from an implicit function sampled on an adaptive grid,such as the ADF's octree. The method is very fast and can producetriangle models in real-time. The method can be used in conjunction withthe ADF data structure to produce LOD models as described below.

Unlike the prior art surface net approach, see citation below, theenhanced method in the present system generates a triangle mesh fromdistance values sampled on an adaptive grid. This presents a specialproblem because neighboring cells in the ADF can have largely varyingsizes. This means that vertices can appear almost anywhere on the commonedges of neighboring cells. Connecting these unpredictably placedvertices, in real-time, to form “quality” triangles is heretofore anunsolved problem.

The new method is based on a surface net method that was developed as analternative to Marching Cubes for building globally smooth but locallyaccurate triangle models from binary volume data sampled on a regulargrid, see Gibson, “Using distance maps for smooth surface representationin sampled volumes,” Proc. 1998 IEEE Volume Visualization Symposium, pp.23-30, 1998. However, that method uses an iterative energy minimizingprocess, while moving triangle vertices. That takes a considerableamount of time. In contrast, the new method according to the inventionmoves vertices to be substantially on the surface of the model in asingle step.

The present method produces triangle vertices that lie on the model'ssurface, and “good quality” triangles, i.e., triangles that are close toequilateral. Further, as described below, the new method easily dealswith the crack problem typically associated with adaptive grids. Inother words, the new method produces triangle models that arewatertight.

The basic three steps of the method are as follows.

-   -   First, each boundary (surface) leaf cell of the ADF is assigned        a vertex that is initially placed at the center location of a        cell.    -   Second, vertices of neighboring cells are connected to form        triangles using the following constraints to produce a        topologically consistent “watertight” mesh:        -   (1) all triangles are connected by vertices of three            neighboring cells that share a common edge, hence, triangles            are associated with cell edges; and        -   (2) a triangle is associated with an edge only if that edge            has a zero crossing of the distance field, i.e., the surface            intersects the edge.    -   Third, after all of the triangles have been formed, triangle        vertices are moved towards the cell's surface, i.e., in the        direction of the ADF gradient, with a single step size equal to        the distance value.

To improve the accuracy and geometry of the mesh, triangle vertices canbe moved over the surface, towards neighboring vertices, to improve theoverall quality of the triangles.

The basic steps of the preferred triangulation method 1400 are shown inFIG. 14. Step 1401 traverses the ADF octree used to store the datavalues of the ADF 10 to select candidate cells using candidate selectionparameters 1420. In one embodiment of the invention, the candidateselection parameters 1420 specify that all boundary leaf cells beselected as candidate cells. In another embodiment of the invention, thecandidate selection parameters 1420 specify that only those boundaryleaf cells whose maximum error measure satisfies a user-specifiedthreshold are selected as candidate cells. Cells below the selectedcells in the ADF octree hierarchy are ignored. In another embodimentboth the depth in the hierarchy, and the error measure can be used toselect candidate cells.

Step 1402 associates vertices with each candidate cell, and sets thevertices to the center of the cells. Step 1403 determines if there areany more candidate cells to be processed. If not, then step 1404 relaxeseach vertex towards the surface of the cell in a direction towards the“average” neighboring vertex, and along a tangent plane containing therelaxed position. Otherwise, for each of the six edges (step 1405), step1406 determines if the surface crosses an edge. If true, step 1407determines the vertices V0, V1, and V2 of the triangle associated withthe edge, see description below, and step 1408 determines the triangle'sorientation from the edge.

In step 1407, vertex V0 is set to the cell's associated vertex,typically the cell's center point. The vertices V1 and V2 are determinedby the method getFaceNeighborVertex( ). Note, the edge has twoneighboring faces, face1 and face2. To determine the vertex V1,getFaceNeighborVertex( ) takes the edge and face1 as input, and sets thevertex V1 to either the vertex of the cell's face-adjacent neighbor ifthe face-adjacent neighbor is the same size or larger than the cell, orelse, the vertex of the unique child cell of the face-adjacent neighborthat is both adjacent to the face and has a zero-crossing on the edge.Similarly, to determine the vertex V2, getFaceNeighborVertex( ) takesthe edge and face2 as input, and sets the vertex V2 to either the vertexof the cell's face-adjacent neighbor if the face-adjacent neighbor isthe same size or larger than the cell, or else, the vertex of the uniquechild cell of the face-adjacent neighbor that is both adjacent to theface and has a zero-crossing on the edge.

FIG. 15 shows one possibility of considering only six out of twelveedges for a 3D cell, e.g. the edges meet at opposing diagonal corners1501-1502.

Most prior art methods for triangulating sampled implicit functionsgenerate triangle vertices on cell edges and faces, see for example,Bloomenthal, “Polygonization of Implicit Surfaces,” Computer AidedGeometric Design, 5(00): pp.341-355, 1988, and Karron et al. “Newfindings from the SpiderWeb algorithm: toward a digital Morse theory,”Proc. Vis. in Biomedical Computing, pp.643-657, 1994.

As shown in 2D in FIG. 16 a, prior art methods can cause cracks in thetriangulated surfaces 1602 where cells of two different sizes meet whenthe implicit function is adaptively sampled. This is because theinterpolated vertex position of one cell may not match the interpolatedposition of its connected neighboring cell. These problems can beaddressed in several ways, but in general, prior art solutions addsignificant complexities to triangulation methods.

In contrast, in the enhanced method of the present system, trianglevertices are generated at cell centers, and triangles can cross thefaces and edges of different sized cells. Thus, the type of cracks shownin FIG. 16 a do not appear. However, cracks may appear in thetriangulated surface when the number of edge crossings between twoneighboring sets of cells differs as illustrated in FIG. 16 b.

This type of crack can be prevented by a pre-conditioning of the ADFduring generation, or prior to triangulation. The pre-conditioning stepcompares the number of zero-crossings of the iso-surface across faces ofboundary leaf cells to the total number of zero-crossings for theassociated iso-surface of their face-adjacent neighbors.

When the number of zero-crossings are not equal, the cell is subdividedusing distance values from its face-adjacent neighbors until the numberof zero-crossings match. For example, the 2D cell on the top in FIG. 16b has no zero-crossings on its bottom edge while the edge-adjacentneighbors have a total of two zero crossings for the same edge. Duringpre-conditioning, the cell on the top is further subdivided.

The present system 100 also takes advantage of ADF's hierarchical datastructure to produce LOD models. Rather than seeding triangle verticesin boundary leaf cells, the hierarchical data structure is traversed andvertices are seeded into boundary cells whose maximum error measure,computed during generation or editing, satisfy a user-specifiedthreshold. Cells below these cells in the hierarchy are ignored. Theerror threshold can be varied continuously enabling fine control overthe number of triangles generated in the LOD model.

Unlike most prior triangle decimation algorithms, the time to produce anLOD model, as described herein, is proportional to the number ofvertices in the output mesh rather than the size of the input mesh.Generation times are orders of magnitude better than possible with priorart methods. The system 100 can generate a 200,000 triangle model in0.37 seconds, and a 2000 triangle model in less than 0.010 seconds on adesktop system with a Pentium IV class processor.

EFFECTS OF THE INVENTION

The present system integrates a powerful shape representation, withexisting production pipelines that are used for digital character designand animation. The system is intuitive to use, expressive in theresolution and quality of detail that can be achieved, and efficient inmemory usage and processing.

Described are methods that take ADFs beyond the concept stage into apractical, working system. These include: innovations in the volumetricsculpting interface that take advantage of the distance field andprovide more control to the user, efficient generation and editingalgorithms with reduced memory requirements, better memory coherency andreduced computation, several new rendering approaches that takeadvantage of hardware acceleration in standard PCs, and a very fastmethod for generating topologically consistent LOD triangle models fromADFs.

Although the invention has been described by way of examples ofpreferred embodiments, it is to be understood that various otheradaptations and modifications may be made within the spirit and scope ofthe invention. Therefore, it is the object of the appended claims tocover all such variations and modifications as come within the truespirit and scope of the invention.

1. A method for correcting an adaptively sampled distance field of amodel, the adaptively sampled distance field including a plurality ofcells, each cell storing a plurality of distance values at vertices ofthe cell, the cells including interior cells, surface cells, andexterior cells, and neighboring cells having a common edge, comprising:marking selected cells as unprocessed cells; marking surface cells asprocessed cells; marking a particular vertex of each unprocessed cell asa minimum vertex, the minimum vertex having a minimum absolute valuedistance value; sorting the unprocessed cells in an ascending order ofthe minimum vertices; and a) appending, for each common edge of eachunprocessed cell, in the sort order, distance values of neighboringprocessed cells to the common edge; b) adjusting the distance values ofthe vertices of the unprocessed cell according to the appended distancevalues of the edges and the distance values of the vertices; c) markingthe unprocessed cell as processed; and repeating steps a, b, and c untilall cells are processed.
 2. The method of claim 1 further comprising:marking each vertex of the unprocessed cell as fixed only if the vertexis shared with a neighboring surface cell, otherwise marking the vertexas free; determining the number of appended distance values associatedwith each free vertex, the associated distance values located betweenthe free vertex and a midpoint on a particular edge connected to thefree vertex; selecting the free vertex with the largest number ofassociated distance values; dividing the unprocessed cell into auniformly sampled grid at a specified resolution; and performing aEuclidean distance transform on the uniformly sampled grid propagatedfrom the free vertex corner with the largest number of associateddistance values to correct only the free vertices of the unprocessedcell.
 3. The method of claim 1 further comprising: marking each vertexof the unprocessed cell as fixed only if the vertex is shared with aprocessed cell, otherwise marking the vertex as free; determining thenumber of appended distance values associated with each free vertex, theassociated distance values located between the free vertex and amidpoint on a particular edge connected to the free vertex; selectingthe free vertex with the largest number of associated distance values;dividing the unprocessed cell into a uniformly sampled grid at aspecified resolution; and performing a Euclidean distance transform onthe uniformly sampled grid propagated from the free vertex corner withthe largest number of associated distance values to correct only thefree vertices of the unprocessed cell.
 4. The method of claim 1 furthercomprising: marking each vertex of the unprocessed cell as fixed only ifthe vertex is shared with a neighboring surface cell, otherwise markingthe vertex as free; adjusting the distance value at each free vertex toa nearest one of the appended distance values.
 5. The method of claim 1further comprising: marking each vertex of the unprocessed cell as fixedonly if the vertex is shared with a neighboring surface cell, otherwisemarking the vertex as free; adjusting the distance value at each freevertex to a combination of the appended distance values.
 6. The methodof claim 5 wherein the combination is an extrapolation.
 7. The method ofclaim 1 further comprising: marking the interior and exterior cells asunprocessed if the interior cells and exterior cells are within aspecified distance from the surface.
 8. The method of claim 1 furthercomprising: marking the interior and exterior cells as unprocessed ifthe interior cells and exterior cells are immediate neighbors of thesurface cells.
 9. The method of claim 1 further comprising: marking theinterior and exterior cells as unprocessed if the interior cells andexterior cells are located in a specified region of the adaptivelysampled distance field.
 10. The method of claim 1 further comprising:marking the interior cells as unprocessed.
 11. The method of claim 1further comprising: marking the exterior cells as unprocessed.
 12. Themethod of claim 1 wherein particular surface cells are marked asunprocessed.